<!--暂未启用-->
<template>
  <Popup
      :round="round"
      v-model="visible"
      @click-overlay="handleClose"
      :close-on-click-overlay="false"
      :safe-area-inset-bottom="true"
      :transition-appear="true"
      :close-on-popstate="true"
      overlay-class="layer_wrap"
  >
    <div class="layer_inside">
      <div class="dept" v-if="!!info&&!!(info['deptName'])">
        <p class="roomName" v-if="!!(info['treatmentRoomName'])">{{info['treatmentRoomName']}}</p>
        <p class="deptName" v-if="checkList.includes(1)&&!!(info['deptName'])">{{info?.deptName}}</p>
        <p class="roomName" v-if="checkList.includes(2)&&info['currPatient']">
          {{info['currPatient'][info['registerObjNameKey']] || info['currPatient']['registerObjName']}}
        </p>
      </div>
      <div class="patient-info" v-if="info['treatingAlert']">
        <div class="item current-patient">
          <div class="content" v-for="(item) in info['currPatient']" :key="item.orderNo">
            {{ item.orderNo || '' }} {{ item.patientName || '' }}
          </div>
        </div>
      </div>
    </div>
  </Popup>
</template>

<script>
import {Popup} from 'vant';

export default {
  name: 'CallCurrentPatient',

  componentName: "CallCurrentPatient",

  props: {
    visible:{
      type: Boolean,
      required: false
    },
    info: {
      type: Object,
      required: true
    },
    checkList:{
      type: Array,
      required: true
    },
  },

  components: {
    Popup,
  },

  data() {
    return {
      round: true,
    }
  },

  computed: {},

  mounted() {
    console.log('init')
  },

  methods: {
    handleClose(){
      console.log('关闭')
      this.$emit('handleCancel');
    }
  },

}
</script>

<style lang="scss" scoped>
@import "./assets/style";
</style>
